Skip to content

Add helper function to get robot series - #488

Merged
urfeex merged 1 commit into
UniversalRobots:masterfrom
urfeex:more_robot_info
Apr 24, 2026
Merged

Add helper function to get robot series#488
urfeex merged 1 commit into
UniversalRobots:masterfrom
urfeex:more_robot_info

Conversation

@urfeex

@urfeex urfeex commented Apr 21, 2026

Copy link
Copy Markdown
Member

As discussed in UniversalRobots/Universal_Robots_ROS2_Driver#842 it might be useful to compare a robot model with the connected robot for verification purposes.

Since at least for the UR3, UR5 and UR10 there are two models respectively (CB3 and e-series), so we would need to be able to distinguish between them. To do that, this PR adds a getRobotSeries() function to the primary client and a robotSeriesFromTypeAndVersion() function to deduce the series from the robot model and software version (as the series isn't directly available to my knowledge).

I decided to return UNDEFINED for combinations that shouldn't show up in the real world (e.g. a CB3 software version on a UR16 or any UR-Series robot).

This is meant to complement UniversalRobots/Universal_Robots_ROS2_Driver#1771 as the series functionality should live in the client library rather than the driver.

@urfeex
urfeex requested a review from a team April 21, 2026 07:42
@urfeex urfeex added the enhancement New feature or request label Apr 21, 2026
@codecov

codecov Bot commented Apr 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 76.74%. Comparing base (632088c) to head (9ead744).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/primary/primary_client.cpp 83.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #488      +/-   ##
==========================================
- Coverage   76.89%   76.74%   -0.15%     
==========================================
  Files         113      113              
  Lines        6021     6043      +22     
  Branches     2628     2637       +9     
==========================================
+ Hits         4630     4638       +8     
- Misses       1055     1065      +10     
- Partials      336      340       +4     
Flag Coverage Δ
python_scripts 75.90% <ø> (ø)
start_ursim 83.88% <ø> (-1.16%) ⬇️
ur20-latest 72.34% <95.65%> (+0.09%) ⬆️
ur5-3.14.3 72.09% <95.65%> (-0.03%) ⬇️
ur5e-10.11.0 65.79% <95.65%> (-0.38%) ⬇️
ur5e-10.12.0 67.34% <95.65%> (+0.02%) ⬆️
ur5e-10.7.0 65.28% <95.65%> (-0.08%) ⬇️
ur5e-5.9.4 72.76% <95.65%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@urfeex
urfeex merged commit fbe69fc into UniversalRobots:master Apr 24, 2026
32 of 39 checks passed
@urfeex
urfeex deleted the more_robot_info branch April 24, 2026 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants